package me.wangxuan.pat.repository;

import java.util.List;
import java.util.Optional;

public interface CrudRepository<T,ID> {
	<S extends T> S save(S entity);

	Optional<T> findById(ID id);

	List<T> findAll();
	
	List<T> findByNativeSql(String sql,Object ...params);

//	boolean existsById(ID id);

	void deleteById(ID id);

	void deleteAll();
}
